#ifndef __DRV_SPI_H
#define __DRV_SPI_H

#include "hc32_ll.h"

/* SPI definition */
#define SPI_UNIT                        (CM_SPI1)
#define SPI_CLK                         (FCG1_PERIPH_SPI1)

/* SPI communication timeout */
#define SPI_COMM_TIMEOUT_VAL            (0x20000000UL)

void SPI1_Init(void);
void SPI1_DMA_Trans(uint8_t *pvTxBuf, uint32_t u32TxLen, uint32_t u32DataWidth, uint32_t u32SrcAddrInc);

#endif // __DRV_SPI_H
